<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('新商户迁移列表')"/>
</head>
<body class="gray-bg">
<div class="container-div">
    <div class="row">
        <div class="col-sm-12 search-collapse">
            <form id="formId">
                <input name="type" type="hidden" value="1">
                <div class="select-list">
                    <ul>
                        <li>
                            <label style="width: 80px;">商户编号：</label>
                            <input type="text" name="merNo"/>
                        </li>
                        <li>
                            <label style="width: 80px;">商户名称：</label>
                            <input type="text" name="merName"/>
                        </li>
                        <li>
                            <label style="width: 80px;">原代理编号：</label>
                            <input type="text" name="agentNum"/>
                        </li>
                        <li>
                            <label style="width: 80px;">原代理名称：</label>
                            <input type="text" name="agentName"/>
                        </li>
                        <li>
                            <label style="width: 80px;">新代理编号：</label>
                            <input type="text" name="newAgentNum"/>
                        </li>

                        <li>
                            <label style="width: 80px;">新代理名称：</label>
                            <input type="text" name="newAgentName"/>
                        </li>
                        <li class="select-time">
                            <label style="width: 80px;">添加时间：</label>
                            <input type="text" class="time-input" id="startTime" placeholder="开始时间"
                                   name="params[beginCreatedate]"/>
                            <span>-</span>
                            <input type="text" class="time-input" id="endTime" placeholder="结束时间"
                                   name="params[endCreatedate]"/>
                        </li>
                        <li>
                            <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
                                    class="fa fa-search"></i>&nbsp;查询</a>
                            <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i
                                    class="fa fa-refresh"></i>&nbsp;清空查询</a>
                        </li>
                        <li>
                            <a class="btn btn-warning" onclick="$.table.exportExcel()"
                               shiro:hasPermission="newMerRecord:newMerRecord:export">
                                <i class="fa fa-download"></i> 导出</a>
                        </li>
                    </ul>
                </div>
            </form>
        </div>

        <div class="btn-group-sm" id="toolbar" role="group">

            <!-- <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="merRecord:merRecord:add">
                 <i class="fa fa-plus"></i> 添加
             </a>
             <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="merRecord:merRecord:edit">
                 <i class="fa fa-edit"></i> 修改
             </a>
             <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="merRecord:merRecord:remove">
                 <i class="fa fa-remove"></i> 删除
             </a>
             -->
        </div>
        <div class="col-sm-12 select-table table-striped">
            <table id="bootstrap-table" class="table text-nowrap"></table>
        </div>
    </div>
</div>
<th:block th:include="include :: footer"/>
<script th:inline="javascript">
    var editFlag = [[${@permission.hasPermi('newMerRecord:newMerRecord:edit')}]];
    var removeFlag = [[${@permission.hasPermi('newMerRecord:newMerRecord:remove')}]];
    var prefix = ctx + "newMerRecord/newMerRecord";

    $(function () {
        var options = {
            url: prefix + "/list",
            createUrl: prefix + "/add",
            updateUrl: prefix + "/edit/{id}",
            removeUrl: prefix + "/remove",
            exportUrl: prefix + "/export",
            modalName: "新商户迁移",
            queryParams: queryParams,
            columns: [{
                checkbox: true
            },
                {
                    field: 'merNo',
                    title: '商户编号'
                },

                {
                    field: 'merName',
                    title: '商户名称'
                },
                {
                    field: 'agentNum',
                    title: '原代理编号'
                },
                {
                    field: 'agentName',
                    title: '原代理商名称'
                },
                {
                    field: 'newAgentNum',
                    title: '新代理编号'
                },
                {
                    field: 'newAgentName',
                    title: '新代理商名称'
                },
                {
                    field: 'sn',
                    title: 'SN'
                },
                {
                    field: 'reachAgentNum',
                    title: '原达标对象编号'
                },
                {
                    field: 'newReachAgentNum',
                    title: '新达标对象编号'
                },
                {
                    field: 'actAgentNum',
                    title: '原激活对象编号'
                },
                {
                    field: 'newActAgentNum',
                    title: '新激活对象编号'
                },
                {
                    field: 'flowAgentNum',
                    title: '原流量卡返现编号'
                }, {
                    field: 'newFlowAgentNum',
                    title: '新流量卡返现编号'
                }, {
                    field: 'updateDate',
                    title: '修改时间'
                },
            ]
        };
        $.table.init(options);
    });

    function queryParams(params) {
        var search = $.table.queryParams(params);
        search.type = "1";
        return search;
    }
</script>
</body>
</html>